package com.xxx.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * 展示(商品)表
 * @TableName show_table
 */
@TableName(value ="show_table")
@Data
public class ShowEntity implements Serializable {
    /**
     * 展示表id
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 展示类型表id
     */
    @TableField(value = "show_type_id")
    private Long showTypeId;

    /**
     * 展示文化名称
     */
    @TableField(value = "show_name")
    private String showName;

    /**
     * 展示图片地址
     */
    @TableField(value = "show_photo_url")
    private String showPhotoUrl;

    /**
     * 描述
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "creation_date")
    private Date creationDate;

    /**
     * 是否是商品 0 不是 1是
     */
    @TableField(value = "goods_flag")
    private Integer goodsFlag;

    /**
     * 商品价格
     */
    @TableField(value = "goods_price")
    private Double goodsPrice;

    /**
     * 删除标识 0
     */
    @TableField(value = "delete_flag")
    private Integer deleteFlag;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ShowEntity that = (ShowEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(showTypeId, that.showTypeId) &&
                Objects.equals(showName, that.showName) &&
                Objects.equals(showPhotoUrl, that.showPhotoUrl) &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(creationDate, that.creationDate) &&
                Objects.equals(goodsFlag, that.goodsFlag) &&
                Objects.equals(goodsPrice, that.goodsPrice) &&
                Objects.equals(deleteFlag, that.deleteFlag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, showTypeId, showName, showPhotoUrl, remark, creationDate, goodsFlag, goodsPrice, deleteFlag);
    }

}